﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace BusinessHandler
{
    public class UserInModuleController : SystemAccountDataContext
    {
        private static UserInModuleController instance;
        public static UserInModuleController Instance
        {
            get
            {
                if (instance == null)
                {
                    instance = new UserInModuleController();
                }
                return instance;
            }
            set
            {
                instance = value;
            }
        }
        public List<UsersInModule> GetUserInModule(int userID)
        {
            SystemAccountDataContext dataContext = new SystemAccountDataContext();
            return (from o in dataContext.UsersInModules
                    where o.UserID == userID
                    select o).ToList();
        }
    }
}